package com.example.spareparts.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.spareparts.entity.OutBoundRecords;
import com.example.spareparts.repository.OutBoundRecordsRepository;
import java.util.List;

@Service
public class OutBoundRecordsService {
    @Autowired
    private OutBoundRecordsRepository outBoundRecordsRepository;
    public List<OutBoundRecords> findAllOutBoundRecords() {
        return outBoundRecordsRepository.findAllOutBoundRecords();
    }
    public void insertOutBoundRecord(OutBoundRecords outBoundRecord) {
        outBoundRecordsRepository.insertOutBoundRecord(outBoundRecord);
    }
    public void updateOutBoundRecord(OutBoundRecords outBoundRecord) {
        outBoundRecordsRepository.updateOutBoundRecord(outBoundRecord);
    }
    public void deleteOutBoundRecord(Long outboundid) {
        outBoundRecordsRepository.deleteOutBoundRecord(outboundid);
    }
    public OutBoundRecords findOutBoundRecordById(Long outboundid) {
        return outBoundRecordsRepository.findOutBoundRecordById(outboundid);
    }
    public List<OutBoundRecords> findOutBoundRecordBySparePartId(Long sparepartid) {
        return outBoundRecordsRepository.findOutBoundRecordBySparePartId(sparepartid);
    }
    public OutBoundRecords findOutBoundRecordByBatchNumber(String batchNumber) {
        return outBoundRecordsRepository.findOutBoundRecordByBatchNumber(batchNumber);
    }

}
